export const MENU_DATA = [
  /* 一级目录 */
  {
    name: 'Dashboard',
    type: 'directory',
    path: '/dashboard',
    component: '#',
    redirect: '/dashboard/analysis',
    title: 'router.dashboard',
    permCode: 'dashboard',
    parent: null,
    icon: 'vi-ant-design:dashboard-filled',
    alwaysShow: true,
  },
  {
    name: 'System',
    type: 'directory',
    path: '/system',
    component: '#',
    redirect: '/system/dict',
    title: 'router.system',
    permCode: 'system',
    parent: null,
    icon: 'vi-ant-design:dashboard-filled',
    alwaysShow: true,
  },
  {
    name: 'Authorization',
    type: 'directory',
    path: '/authorization',
    component: '#',
    redirect: '/authorization/user',
    title: 'router.authorization',
    icon: 'vi-eos-icons:role-binding',
    permCode: 'authorization',
    alwaysShow: true,
    parent: null,
  },

  /* 首页子菜单 */
  {
    name: 'Analysis',
    type: 'menu',
    path: 'analysis',
    component: 'views/Dashboard/Analysis',
    title: '分析页',
    permCode: 'analysis',
    parent: 'Dashboard',
    noCache: true,
  },
  {
    name: 'Workplace',
    type: 'menu',
    path: 'workplace',
    component: 'views/Dashboard/Workplace',
    title: '工作台',
    permCode: 'workplace',
    parent: 'Dashboard',
    noCache: true,
  },

  /* 权限管理子菜单 */

  /* 部门管理 API 权限 */
  {
    name: 'Department',
    type: 'menu',
    path: 'department',
    component: 'views/Authorization/Department/Department',
    title: 'router.department',
    permCode: 'department',
    parent: 'Authorization',
  },
  {
    name: 'department:page',
    type: 'button',
    title: '分页查询',
    permCode: 'department:page',
    parent: 'Department',
    path: '/api/departments/page',
  },
  {
    name: 'department:all',
    type: 'api',
    title: '获取所有部门',
    permCode: 'department:all',
    parent: 'Department',
    path: '/api/departments/all',
  },
  {
    name: 'department:all:self',
    type: 'api',
    title: '获取所有部门',
    permCode: 'department:all:self',
    parent: 'Department',
    path: '/api/departments/all/self',
  },
  {
    name: 'department:create',
    type: 'button',
    title: '新增',
    permCode: 'department:create',
    parent: 'Department',
    path: '/api/departments/create',
  },
  {
    name: 'department:update',
    type: 'button',
    title: '编辑',
    permCode: 'department:update',
    parent: 'Department',
    path: '/api/departments/update/:id',
  },
  {
    name: 'department:detail',
    type: 'button',
    title: '详情',
    permCode: 'department:detail',
    parent: 'Department',
    path: '/api/departments/detail/:id',
  },
  {
    name: 'department:delete',
    type: 'button',
    title: '删除',
    permCode: 'department:delete',
    parent: 'Department',
    path: '/api/departments/delete/:ids',
  },

  /* 用户管理 API 权限 */
  {
    name: 'User',
    type: 'menu',
    path: 'user',
    component: 'views/Authorization/User/User',
    title: 'router.user',
    permCode: 'user',
    parent: 'Authorization',
  },
  { name: 'user:page', type: 'button', title: '查询', permCode: 'user:page', parent: 'User', path: '/api/user/page' },
  {
    name: 'user:create',
    type: 'button',
    title: '新增',
    permCode: 'user:create',
    parent: 'User',
    path: '/api/user/create',
  },
  {
    name: 'user:detail',
    type: 'button',
    title: '详情',
    permCode: 'user:detail',
    parent: 'User',
    path: '/api/user/detail/:id',
  },
  {
    name: 'user:update:self',
    type: 'button',
    title: '编辑',
    permCode: 'user:update:self',
    parent: 'User',
    path: '/api/user/update',
  },
  {
    name: 'user:update',
    type: 'button',
    title: '编辑',
    permCode: 'user:update',
    parent: 'User',
    path: '/api/user/update/:id',
  },
  {
    name: 'user:update:password',
    type: 'button',
    title: '修改密码',
    permCode: 'user:update:password',
    parent: 'User',
    path: '/api/user/reset-password',
  },
  {
    name: 'user:update:reset-password',
    type: 'button',
    title: '恢复默认密码',
    permCode: 'user:update:reset-password',
    parent: 'User',
    path: '/api/user/reset-default-password/:id',
  },
  {
    name: 'user:update:status',
    type: 'button',
    title: '状态',
    permCode: 'user:update:status',
    parent: 'User',
    path: '/api/user/update/status/:id',
  },

  /* 菜单管理 API 权限 */
  {
    name: 'Menu',
    type: 'menu',
    path: 'menu',
    component: 'views/Authorization/Menu/Menu',
    title: 'router.menuManagement',
    permCode: 'menu',
    parent: 'Authorization',
  },
  {
    name: 'menus:list:all',
    type: 'api',
    title: '获取完整菜单树',
    permCode: 'menus:list:all',
    parent: 'Menu',
    path: '/api/menus/list/all',
  },
  {
    name: 'menus:perms:button',
    type: 'api',
    title: '获取按钮权限',
    permCode: 'menus:perms:button',
    parent: 'Menu',
    path: '/api/menus/perms/button',
  },
  {
    name: 'menus:perms:api',
    type: 'api',
    title: '获取 API 权限码',
    permCode: 'menus:perms:api',
    parent: 'Menu',
    path: '/api/menus/perms/api',
  },
  {
    name: 'menus:perms:all',
    type: 'api',
    title: '获取全部权限码',
    permCode: 'menus:perms:all',
    parent: 'Menu',
    path: '/api/menus/perms/all',
  },
  {
    name: 'menus:page',
    type: 'button',
    title: '查询',
    permCode: 'menus:page',
    parent: 'Menu',
    path: '/api/menus/page',
  },
  {
    name: 'menus:detail',
    type: 'button',
    title: '详情',
    permCode: 'menus:detail',
    parent: 'Menu',
    path: '/api/menus/:id',
  },
  {
    name: 'menus:create',
    type: 'button',
    title: '新增',
    permCode: 'menus:create',
    parent: 'Menu',
    path: '/api/menus/create',
  },
  {
    name: 'menus:update',
    type: 'button',
    title: '修改',
    permCode: 'menus:update',
    parent: 'Menu',
    path: '/api/menus/update/:id',
  },
  {
    name: 'menus:delete',
    type: 'button',
    title: '删除',
    permCode: 'menus:delete',
    parent: 'Menu',
    path: '/api/menus/delete/:id',
  },

  /* 角色管理 API 权限 */
  {
    name: 'Role',
    type: 'menu',
    path: 'role',
    component: 'views/Authorization/Role/Role',
    title: 'router.role',
    permCode: 'role',
    parent: 'Authorization',
  },
  {
    name: 'roles:page',
    type: 'button',
    title: '查询',
    permCode: 'roles:page',
    parent: 'Role',
    path: '/api/roles/page',
  },
  {
    name: 'roles:detail',
    type: 'button',
    title: '详情',
    permCode: 'roles:detail',
    parent: 'Role',
    path: '/api/roles/detail/:code',
  },
  {
    name: 'roles:create',
    type: 'button',
    title: '新增',
    permCode: 'roles:create',
    parent: 'Role',
    path: '/api/roles/create',
  },
  {
    name: 'roles:update',
    type: 'button',
    title: '修改',
    permCode: 'roles:update',
    parent: 'Role',
    path: '/api/roles/update/:code',
  },
  {
    name: 'roles:delete',
    type: 'button',
    title: '删除',
    permCode: 'roles:delete',
    parent: 'Role',
    path: '/api/roles/delete/:code',
  },

  /* 系统管理子菜单 */

  /* 字典管理 API 权限 */
  {
    name: 'Dict',
    type: 'menu',
    path: 'dict',
    component: 'views/System/Dict/Dict',
    title: 'router.dict',
    permCode: 'dict',
    parent: 'System',
  },
  {
    name: 'dicts:create',
    type: 'button',
    title: '新增',
    permCode: 'dicts:create',
    parent: 'Dict',
    path: '/api/dicts/create',
  },
  {
    name: 'dicts:update',
    type: 'button',
    title: '编辑',
    permCode: 'dicts:update',
    parent: 'Dict',
    path: '/api/dicts/update/:code',
  },
  {
    name: 'dicts:page',
    type: 'button',
    title: '查询',
    permCode: 'dicts:page',
    parent: 'Dict',
    path: '/api/dicts/page',
  },
  {
    name: 'dicts:list',
    type: 'button',
    title: '键值列表',
    permCode: 'dicts:list',
    parent: 'Dict',
    path: '/api/dicts/list',
  },
  {
    name: 'dicts:detail',
    type: 'button',
    title: '详情',
    permCode: 'dicts:detail',
    parent: 'Dict',
    path: '/api/dicts/detail/:code',
  },
  {
    name: 'dicts:detail:all',
    type: 'api',
    title: '详情',
    permCode: 'dicts:detail:all',
    parent: 'Dict',
    path: '/api/dicts/detail/all/:code',
  },
  {
    name: 'dicts:delete',
    type: 'button',
    title: '删除',
    permCode: 'dicts:delete',
    parent: 'Dict',
    path: '/api/dicts/delete/:code',
  },

  /* 日志管理 API 权限 */
  {
    name: 'Log',
    type: 'menu',
    path: 'log',
    component: 'views/System/Log/Log',
    title: 'router.log',
    permCode: 'log',
    parent: 'System',
  },
  {
    name: 'log:page',
    type: 'button',
    title: '查询',
    permCode: 'log:page',
    parent: 'Log',
    path: '/api/log/page',
  },
  {
    name: 'log:detail',
    type: 'api',
    title: '查询',
    permCode: 'log:detail',
    parent: 'Log',
    path: '/api/log/detail/:id',
  }

] as const;
